﻿using Code;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace github.heerheer.card2.UI
{
    internal class PoolBackUP
    {
        public static void saveBack(string path1,string path2)
        {
            checkBackDir();
            if (!File.Exists(path2))
            {
                File.Create(path2).Close();
            }
              File.WriteAllText(path2, File.ReadAllText(path1));
        }
        private static void checkBackDir()
        {
            if (!Directory.Exists(AppMain.Common.AppDirectory + "pools\\backups"))
            {
                Directory.CreateDirectory(AppMain.Common.AppDirectory + "pools\\backups");
            }
        }
    }
}
